package com.shi.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

/**
 * @author 石泉
 * @version 1.0
 * @date 21/08/28 15:18
 */
@Service
public class AlphaService {
    private static final Logger LOGGER = LoggerFactory.getLogger(AlphaService.class);

    // 可以让该方法在多线程的环境下，被异步的调用
    @Async
    public void execute1(){
        LOGGER.debug("execute1");
    }

   // @Scheduled(initialDelay = 10000,fixedRate = 1000)
    public void execute2(){
        LOGGER.debug("execute2");
    }
}
